using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using SMB.WebControls;
//using SMB.Utility;

namespace SMBERP.GS.UserControl
{
    public partial class ucDateToolBar : System.Web.UI.UserControl
    {
        //public delegate void SelectedDateEventHandler(DateTime StartDate, DateTime EndDate);
        //public event SelectedDateEventHandler EventSelectedDate;
        //private void OnSelectedDate(DateTime xStartDate, DateTime xEndDate)
        //{
        //    if (EventSelectedDate != null) { EventSelectedDate(xStartDate,xEndDate); }
        //}
        //public bool ShowTextBoxDay
        //{
        //    get { return txtUcEndDate.ShowDay; }
        //    set { 
        //        txtUcEndDate.ShowDay = value;
        //        txtucStartDate.ShowDay = value;
        //    }
        //}
        //public string Title
        //{
        //    get { return  lblTitle.Text; }
        //    set { lblTitle.Text = value; }
        //}
        //public bool ShowYear
        //{
        //    get { return DateBrowsingBar1.ShowYear; }
        //    set { DateBrowsingBar1.ShowYear = value; }
        //}
        //public bool ShowDay
        //{
        //    get { return DateBrowsingBar1.ShowDay; }
        //    set { DateBrowsingBar1.ShowDay = value; }
        //}
        //public bool ShowWeek
        //{
        //    get { return DateBrowsingBar1.ShowWeek; }
        //    set { DateBrowsingBar1.ShowWeek = value; }
        //}
        //public bool ShowMonth
        //{
        //    get { return DateBrowsingBar1.ShowMonth; }
        //    set { DateBrowsingBar1.ShowMonth = value; }
        //}
        //public DateTime StartDate
        //{
        //    get { return (ViewState["StartDate"] == null) ? DateTime.MinValue : Convert.ToDateTime(ViewState["StartDate"]); }
        //    set { ViewState["StartDate"] = value; }
        //}
        //public DateTime EndDate
        //{
        //    get { return (ViewState["EndDate"] == null) ? DateTime.MinValue : Convert.ToDateTime(ViewState["EndDate"]); }
        //    set { ViewState["EndDate"] = value; }
        //}

        //protected void Page_Load(object sender, EventArgs e)
        //{

        //}

        //protected void Display()
        //{
        //    BindDateTextBox();
        //    OnSelectedDate(StartDate, EndDate);
        //}

        //protected void Button1_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        StartDate = txtucStartDate.DateTimeValue;
        //        EndDate = txtUcEndDate.DateTimeValue;

        //        Display();
        //    }
        //    catch (Exception ex)
        //    { JScript.Alert(ex.Message); }
        //}

        //public void BindDateTextBox()
        //{
        //    txtucStartDate.DateTimeValue = StartDate ;
        //    txtUcEndDate.DateTimeValue = EndDate;
        //}

        //protected void DateBrowsingBar1_Click(object sender, SMB.WebControls.Common.DateBrowsingBar.EventArgs e)
        //{
        //    StartDate = e.StartDate;
        //    EndDate = e.EndDate;
        //    Display();
        //}
    }
}